package com.thinta.wind.ui.home.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.thinta.wind.base.BaseModel
import com.thinta.wind.base.safetyLaunch
import com.thinta.wind.entity.HomeRecommendItemListBean
import com.thinta.wind.entity.RecommendBannerItem
import com.thinta.wind.ui.home.repository.FollowRepository

class FollowViewModel(private val repository: FollowRepository) : BaseModel() {

    var result = MutableLiveData<List<HomeRecommendItemListBean>>()
    var bannerResult = MutableLiveData<List<RecommendBannerItem>>()

    fun getFollowList(page : Int){
        viewModelScope.safetyLaunch {
            result.postValue(repository.getFollowList(page))
        }
    }

    fun getFollowBanner(){
        viewModelScope.safetyLaunch {
            bannerResult.postValue(repository.getFollowBanner())
        }
    }

}
